<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="shortcut icon" href="<%=basePath%>static/logo.png">
	<link rel="stylesheet" href="<%=basePath%>static/css/iconfont.css">
	<link rel="stylesheet" href="<%=basePath%>static/css/global.css">
	<link rel="stylesheet" href="<%=basePath%>static/css/bootstrap.min.css">
	<link rel="stylesheet" href="<%=basePath%>static/css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="<%=basePath%>static/css/swiper.min.css">
	<link rel="stylesheet" href="<%=basePath%>static/css/styles.css">
	<script src="<%=basePath%>static/js/jquery.1.12.4.min.js" charset="UTF-8"></script>
	<script src="<%=basePath%>static/js/bootstrap.min.js" charset="UTF-8"></script>
	<script src="<%=basePath%>static/js/swiper.min.js" charset="UTF-8"></script>
	<script src="<%=basePath%>static/js/global.js" charset="UTF-8"></script>
	<script src="<%=basePath%>static/js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script>
	<script type="text/javascript">
	//查询到所有的商品信息
	
	$(document).ready(function(){
    	var theme='<%=session.getAttribute("username")%>';
		 //alert(theme);
		 if(theme==null||theme=="null"){
			 $("#dengluzhuce").show(); 
			 $("#tuichudenglu").hide();
			 $("#xianshi").hide();
		 }else{
			 $("#dengluzhuce").hide();  
			 $("#tuichudenglu").show();
		 }
		 
		 $.ajax({
				type:"POST",
				url:"../web/SelectCategory",
				//data:{userid:userid},
				//dataType:"json",
				success:function(data){
					//alert("ajax");
				}
			});
		 
		 $.ajax({
				type:"POST",
				url:"../web/SelectGoods",
				//data:{userid:userid},
				//dataType:"json",
				success:function(data){
					//alert("ajax");
					
				}
			});
		
	});
	</script>
	<title>卓越图书网</title>
	<base href="<%=basePath%>jsp/"/>
</head>
<body>
	<!-- 顶部tab -->
	<div class="tab-header">
		<div class="inner">
			<div class="pull-left">
				<div class="pull-left">嗨，欢迎来到<span class="cr">卓越图书网</span>
					<span id="xianshi">尊敬的<%out.println(session.getAttribute("username")); %></span>
				</div>
				
			</div>
			<div class="pull-right" id="dengluzhuce">
				<a href="<%=basePath%>jsp/login.jsp"><span class="cr">登录</span></a>
				<a href="<%=basePath%>jsp/login.jsp?p=register">注册</a>
			</div>
			<div class="pull-right" id="tuichudenglu">
			    <a href="<%=basePath%>jsp/udai_welcome.jsp"><span class="cr">个人中心</span></a>
				<a href="<%=basePath%>jsp/login.jsp"><span class="cr">退出登录</span></a>
			</div>
		</div>
	</div>
	<!-- 搜索栏 -->
	<div class="top-search">
		<div class="inner">
			<a class="logo" href="<%=basePath%>jsp/homePage.jsp"><img src="<%=basePath%>static/images/icons/logo.png" alt="卓越图书网" class="cover"></a>
			<div class="search-box" >
				<form action="../web/DimSearch" class="input-group">
					<input name=goods_dimSearch placeholder="Ta们都在搜卓越图书网" type="text">
					<span class="input-group-btn">
						<button type="submit">
							<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
						</button>
					</span>
				</form>
				<p class="help-block text-nowrap">
					<a href="">海的女儿</a>
					<a href="">哈利波特</a>
					<a href="">活着</a>
					<a href="">名侦探柯南</a>
					<a href="">艺术博物馆</a>
				</p>
			</div>
			<div class="cart-box">
				<a href="<%=basePath%>jsp/shopcart.jsp" class="cart-but">
					<i class="iconfont icon-shopcart cr fz16"></i> 购物车
				</a>
			</div>
		</div>
	</div>
	<!-- 内页导航栏 -->
	<div class="top-nav bg3">
		<div class="nav-box inner">
			<div class="all-cat">
				<div class="title"><i class="iconfont icon-menu"></i> 全部分类</div>
			</div>
			<ul class="nva-list">
				<a href="homePage.jsp"><li>首页</li></a>
			</ul>
		</div>
	</div>
	<div class="content inner">
		<section class="filter-section clearfix">
			<ol class="breadcrumb">
				<li><a href="homePage.jsp">首页</a></li>
				<li class="active">满减专区</li>
			</ol>
			<div class="filter-box">
				<div class="all-filter">
					<div class="filter-value">
						<a href="" class="sale-title active">满减专区</a>
						<a href="" class="sale-title">热卖专区</a>
						<a href="" class="sale-title">折扣专区</a>
					</div>
				</div>
			</div>
			<div class="sort-box bgf5">
				<div class="sort-text">排序：</div>
				<a href=""><div class="sort-text">销量 <i class="iconfont icon-sortDown"></i></div></a>
				<a href=""><div class="sort-text">评价 <i class="iconfont icon-sortUp"></i></div></a>
				<a href=""><div class="sort-text">价格 <i class="iconfont"></i></div></a>
				<div class="sort-total pull-right">众多商品供你选择</div>
			</div>
		</section>
		<section class="item-show__div clearfix">
			<div class="pull-left">
				<div class="item-list__area clearfix">
					<c:forEach  items="${dimgoods}" var="good" >
						<div class="item-card">
						<a href="<%=basePath%>web/SelectGoodsMsgById?goodid=${good.goodsId}" class="photo">
							<img src="<%=basePath%>${good.goodsImg}"  class="cover">
							<div class="name">${good.goodsName}</div></a>
						<div class="middle">
							<div class="price"><small>￥</small>${good.price}</div>
						</div>
						<div class="buttom">
							<div>销量 <b>666</b></div>
							<div>人气 <b>888</b></div>
							<div>评论 <b>1688</b></div>
						</div>
					</div>
					</c:forEach>
				</div>
				<!-- 分页 -->
				<div class="page text-right clearfix">
					<a class="disabled">上一页</a>
					<a class="select">1</a>
					<a href="">2</a>
					<a href="">3</a>
					<a href="">4</a>
					<a href="">5</a>
					<a class="" href="">下一页</a>
					<a class="disabled">1/5页</a>
					<form action="" class="page-order">
						到第
						<input type="text" name="page">
						页
						<input class="sub" type="submit" value="确定">
					</form>
				</div>
			</div>
			<div class="pull-right">
				
			</div>
		</section>
	</div>
	<!-- 右侧菜单 -->
	<div class="right-nav">
		<ul class="r-with-gotop">
			<li class="r-toolbar-item">
				<a href="udai_welcome.jsp" class="r-item-hd">
					<i class="iconfont icon-user" data-badge="0"></i>
					<div class="r-tip__box"><span class="r-tip-text">用户中心</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_shopcart.jsp" class="r-item-hd">
					<i class="iconfont icon-cart"></i>
					<div class="r-tip__box"><span class="r-tip-text">购物车</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_collection.jsp" class="r-item-hd">
					<i class="iconfont icon-aixin"></i>
					<div class="r-tip__box"><span class="r-tip-text">我的收藏</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="" class="r-item-hd">
					<i class="iconfont icon-liaotian"></i>
					<div class="r-tip__box"><span class="r-tip-text">联系客服</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="issues.jsp" class="r-item-hd">
					<i class="iconfont icon-liuyan"></i>
					<div class="r-tip__box"><span class="r-tip-text">留言反馈</span></div>
				</a>
			</li>
			<li class="r-toolbar-item to-top">
				<i class="iconfont icon-top"></i>
				<div class="r-tip__box"><span class="r-tip-text">返回顶部</span></div>
			</li>
		</ul>
		<script>
			$(document).ready(function(){ $('.to-top').toTop({position:false}) });
		</script>
	</div>
	<!-- 底部信息 -->
	<div class="footer">
		<div class="footer-tags">
			<div class="tags-box inner">
				<div class="tag-div">
					<img src="<%=basePath%>static/images/icons/footer_1.gif" alt="厂家直供">
				</div>
				<div class="tag-div">
					<img src="<%=basePath%>static/images/icons/footer_2.gif" alt="一件代发">
				</div>
				<div class="tag-div">
					<img src="<%=basePath%>static/images/icons/footer_3.gif" alt="美工活动支持">
				</div>
				<div class="tag-div">
					<img src="<%=basePath%>static/images/icons/footer_4.gif" alt="信誉认证">
				</div>
			</div>
		</div>
		<div class="copy-box clearfix">
			<!-- 版权 -->
			<p class="copyright">
					© 2019-2020 卓越图书网 版权所有，并保留所有权利<br>
			</p>
		</div>
	</div>
</body>
</html>